<template>
  <div>
    animate__fadeOut
    <transition
      name="fade"
      enter-active-class="animated fadeInLeft"
      leave-active-class="animated fadeOutRight"
    >
      <h2 v-show="show">hello world</h2>
    </transition>
    <button @click="toggle">切换</button>

  </div>
</template>

<script>
export default {
  data() {
    return {
      show: true,
    };
  },
  methods: {
    toggle() {
      this.show = !this.show;
    },
  },
};
</script>

<style>
</style>